package com.goldcn.picture.service;

import com.goldcn.common.CommonTools;
import com.goldcn.common.util.CommonUtils;
import com.goldcn.common.util.IdGen;
import com.goldcn.enumeration.ErrorCodeEnum;
import com.goldcn.picture.dao.PicBaseDictItemMapper;
import com.goldcn.picture.dao.PicSysTagsItemMapper;
import com.goldcn.picture.dao.PicSysTagsMapper;
import com.goldcn.picture.dao.PicTagsMapper;
import com.goldcn.picture.dto.QueryDictResultDto;
import com.goldcn.picture.dto.QueryPicTagDto;
import com.goldcn.picture.model.PicBaseDictItem;
import com.goldcn.picture.model.PicSysTags;
import com.goldcn.picture.model.PicSysTagsItem;
import com.goldcn.picture.model.PicTags;
import com.goldcn.picture.vo.PicSysTagsVo;
import com.goldcn.picture.vo.PicTagsVo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class PicDictService {


    @Autowired
    PicBaseDictItemMapper picBaseDictItemMapper;


    public  List<QueryDictResultDto> selectListDict(List<String> codes){
        List<QueryDictResultDto> dtoList=new ArrayList<>();
        if (codes.size()>0){
            for (String code:codes){
                QueryDictResultDto dto=new QueryDictResultDto();
                dto.setCode(code);
                dto.setVal(picBaseDictItemMapper.selectListDict(code));
                dtoList.add(dto);
            }
        }
        return dtoList;
    }
}
